<% header_image = @item[:header_image] %>
<% header_class = @item[:header_class] || (header_image ? 'bg-photo' : 'bg-dark') %>
<% if header_class == 'bg-photo' %>
<div class="<%= header_class %>" style="background-image: url('<%= h header_image %>')">
<% else %>
<div class="<%= header_class %>">
<% end %>
  <h1><%= @item[:title] %></h1>
  <% if @item[:subtitle] %>
  <h2><%= h @item[:subtitle] %></h2>
  <% end %>
</div>
